<?php
Q::loadFile('swift_required.php',dirname(dirname(dirname(__FILE__))).'/lib/swift/lib');

abstract class Helper_Swift {
	
	
	static function messager(){
		// Create a message
		$message = Swift_Message::newInstance();
		
		return $message;
	}
	static function mailer(){
		
		// Create the Transport
		$smtp=Q::ini('appini/smtp');
		
		$transport = Swift_SmtpTransport::newInstance($smtp['host'], $smtp['port'])
		->setUsername($smtp['user'])
		->setPassword($smtp['password']);
		
		
		$mailer = Swift_Mailer::newInstance($transport);		
		
		return $mailer;
		
	}
}